<script setup>
import { RouterLink, RouterView } from 'vue-router';
</script>

<template>
  <header>
    <div class="wrapper">
      <nav>
        <RouterLink to="/vuex">vuex源码</RouterLink>
        <RouterLink to="/pinia">pinia源码</RouterLink>
        <RouterLink to="/canvas">canvas</RouterLink>
      </nav>
    </div>
  </header>

  <RouterView />
</template>

<style lang="scss" scoped>
header {
  line-height: 1.5;
  max-height: 100vh;
}

nav {
  width: 100%;
  font-size: 12px;
  text-align: center;
  margin-top: 1rem;
  a {
    font-size: 16px;
    padding: 0 15px;
    text-decoration: none;
    color: #333;
    &.router-link-active {
      text-decoration: underline;
      font-weight: bold;
      color: blue;
    }
  }
}
</style>
